package com.class05.service.impl;

import com.class05.domain.Student;
import com.class05.mapper.StudentMapper;
import com.class05.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;




@Service
public class StudentServiceImpl implements StudentService {


//    @Resource
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public void insertStudent(Student student) {
        studentMapper.insert(student);
    }

    @Override
    public Student queryById(Integer id) {
        if(id != null){
            return studentMapper.selectById(id);
        }
        return null;
    }
}
